import axios from 'axios';


export function searchProjects(param) {
    return axios({
        method: 'get',
        url: '/projectInTeam/list',
        params: param,
        headers: {
            'Cache-Control': 'no-cache'
        }
    })
}

export function searchAllCatas(param) {
    return axios({
        method: 'get',
        url: '/completedCatalog/list',
        params: param,
        headers: {
            'Cache-Control': 'no-cache'
        }
    })
}

export function editWorkDataCata (param) {
    return axios({
        method : 'get',
        url : '/completedCatalog/queryOne',
        params: param,
        headers: {
            'Cache-Control': 'no-cache'
        }
    })
}


export function saveWorkDataDoc (param) {
    return axios({
        method : 'post',
        url : '/completedCollate/insertOrUpdate',
        data: param,
        headers: {
            'Cache-Control': 'no-cache'
        }
    })
}

export function searchCollateDetail(param) {
    return axios({
        method: 'get',
        url: '/completedCollate/queryOne',
        params: param,
        headers: {
            'Cache-Control': 'no-cache'
        }
    })
}

export function getPrintCode(param) {
    return axios({
        method: 'get',
        url: '/bo/getPrintCode',
        params: param,
        headers: {
            'Cache-Control': 'no-cache'
        }
    })
}

//单据预览2019022版
export function getPrintCodeByType(param) {
    return axios({
        method: 'get',
        url: '/bo/getPrintCodeByType',
        params: param,
        headers: {
            'Cache-Control': 'no-cache'
        }
    })
}

export function getBillDetail(param) {
    return axios({
        method: 'get',
        url: '/print/preview',
        params: param,
        headers: {
            'Cache-Control': 'no-cache'
        }
    })
}

export function getQuoteNameAndPk(param) {
    return axios({
        method: 'post',
        url: '/completedCollate/preview/getQuoteNameAndPk',
        data: param,
        headers: {
            'Cache-Control': 'no-cache'
        }
    })
}

//模版下载     /file/download
export function downloadTemplate(param) {
    return axios({
        method: 'get',
        url: '/file/download',
        params: param,
        headers: {
            'Cache-Control': 'no-cache'
        }
    })
}

export function getosssignForPost (param) {
    return axios({
        method : 'get',
        url : '/oss/signForPost',
        params: param,
        headers: {
            'Cache-Control': 'no-cache'
        }
    })
}